package com.icangya.DAO.impl;

import com.icangya.DAO.IRwCarousePicDAO;
import com.icangya.domain.RwCarousePic;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class RwCarousePicDAOImpl extends  BaseDAO<RwCarousePic> implements IRwCarousePicDAO {

    Logger logger = LoggerFactory.getLogger(this.getClass());


    @Override
    public List<RwCarousePic> selectRwCarousePicByShopId(long shopId) {

        String hql=" FROM RwCarousePic rc where rc.shopId = ? ";

        List<RwCarousePic> list= (List<RwCarousePic>) getHibernateTemplate().find(hql,shopId);

        if(list.size()>0)
            return list;

        return null;
    }


}
